<?php

use Faker\Factory;
use Illuminate\Database\Seeder;

class FinaBankInfoTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //先清空表
        DB::table('wy_fina_bank_info')->truncate();
        //实例化faker类
        $faker = Factory::create('zh_CN');//生成中文数据
        //循环
        for ($i = 1; $i <= 5; $i++) {
            DB::table('wy_fina_bank_info')->insert([
                'bank_name'      => $faker->name . '银行',
                'bank_full_name' => $faker->name . '银行',
                'type'           => mt_rand(1, 3),
            ]);
        }
    }
}
